package com.bcu.cn.onlineexamsystem.studentmanage.controller;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 成绩分析数据传输对象
 */
public class ScoreAnalysisDTO {
    
    /**
     * 考试记录信息
     */
    public static class ExamRecord {
        private Long recordId;
        private String examName;
        private String courseName;
        private LocalDateTime examTime;
        private BigDecimal score;
        private BigDecimal totalScore;
        private String status;
        
        // getters and setters
        public Long getRecordId() { return recordId; }
        public void setRecordId(Long recordId) { this.recordId = recordId; }
        
        public String getExamName() { return examName; }
        public void setExamName(String examName) { this.examName = examName; }
        
        public String getCourseName() { return courseName; }
        public void setCourseName(String courseName) { this.courseName = courseName; }
        
        public LocalDateTime getExamTime() { return examTime; }
        public void setExamTime(LocalDateTime examTime) { this.examTime = examTime; }
        
        public BigDecimal getScore() { return score; }
        public void setScore(BigDecimal score) { this.score = score; }
        
        public BigDecimal getTotalScore() { return totalScore; }
        public void setTotalScore(BigDecimal totalScore) { this.totalScore = totalScore; }
        
        public String getStatus() { return status; }
        public void setStatus(String status) { this.status = status; }
    }
    
    /**
     * 成绩统计信息
     */
    public static class ScoreStatistics {
        private Integer totalExams;
        private BigDecimal averageScore;
        private BigDecimal highestScore;
        private BigDecimal lowestScore;
        private Integer passCount;
        private Integer failCount;
        private BigDecimal passRate;
        
        // getters and setters
        public Integer getTotalExams() { return totalExams; }
        public void setTotalExams(Integer totalExams) { this.totalExams = totalExams; }
        
        public BigDecimal getAverageScore() { return averageScore; }
        public void setAverageScore(BigDecimal averageScore) { this.averageScore = averageScore; }
        
        public BigDecimal getHighestScore() { return highestScore; }
        public void setHighestScore(BigDecimal highestScore) { this.highestScore = highestScore; }
        
        public BigDecimal getLowestScore() { return lowestScore; }
        public void setLowestScore(BigDecimal lowestScore) { this.lowestScore = lowestScore; }
        
        public Integer getPassCount() { return passCount; }
        public void setPassCount(Integer passCount) { this.passCount = passCount; }
        
        public Integer getFailCount() { return failCount; }
        public void setFailCount(Integer failCount) { this.failCount = failCount; }
        
        public BigDecimal getPassRate() { return passRate; }
        public void setPassRate(BigDecimal passRate) { this.passRate = passRate; }
    }
    
    /**
     * 课程成绩分析
     */
    public static class CourseScoreAnalysis {
        private String courseName;
        private BigDecimal averageScore;
        private Integer examCount;
        private List<BigDecimal> scores;
        private List<String> examNames;
        private List<BigDecimal> totalScores;
        
        // getters and setters
        public String getCourseName() { return courseName; }
        public void setCourseName(String courseName) { this.courseName = courseName; }
        
        public BigDecimal getAverageScore() { return averageScore; }
        public void setAverageScore(BigDecimal averageScore) { this.averageScore = averageScore; }
        
        public Integer getExamCount() { return examCount; }
        public void setExamCount(Integer examCount) { this.examCount = examCount; }
        
        public List<BigDecimal> getScores() { return scores; }
        public void setScores(List<BigDecimal> scores) { this.scores = scores; }
        
        public List<String> getExamNames() { return examNames; }
        public void setExamNames(List<String> examNames) { this.examNames = examNames; }
        
        public List<BigDecimal> getTotalScores() { return totalScores; }
        public void setTotalScores(List<BigDecimal> totalScores) { this.totalScores = totalScores; }
    }
    
    /**
     * 成绩趋势数据
     */
    public static class ScoreTrend {
        private List<String> examDates;
        private List<BigDecimal> scores;
        private List<String> examNames;
        
        // getters and setters
        public List<String> getExamDates() { return examDates; }
        public void setExamDates(List<String> examDates) { this.examDates = examDates; }
        
        public List<BigDecimal> getScores() { return scores; }
        public void setScores(List<BigDecimal> scores) { this.scores = scores; }
        
        public List<String> getExamNames() { return examNames; }
        public void setExamNames(List<String> examNames) { this.examNames = examNames; }
    }
    
    /**
     * 成绩分布数据
     */
    public static class ScoreDistribution {
        private List<String> ranges;
        private List<Integer> counts;
        
        // getters and setters
        public List<String> getRanges() { return ranges; }
        public void setRanges(List<String> ranges) { this.ranges = ranges; }
        
        public List<Integer> getCounts() { return counts; }
        public void setCounts(List<Integer> counts) { this.counts = counts; }
    }
} 